home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / comm / combt102.zip / SAMPLE.BAT < prev   
DOS Batch File  |  1992-01-05  |  977b  |  67 lines

  1. echo off
  2. rem
  3. rem
  4. rem         SAMPLE BATCH FILE USING 'COMMBAT' UTILITY
  5. rem
  6. rem
  7.  
  8. rem    Set port to 9600 baud, 7 data bits, even parity, 10 sec timeout
  9. set _config=10,96,e,7,1
  10.  
  11. rem    Send [CR]
  12. set _send=\r
  13.  
  14. rem    Trigger 1 - 4
  15. set _trig1=BBC,XYZ,10
  16. set _trig2=BUG\g,,5
  17. set _trig3=BC,QQQ
  18. set _trig4=ABC,XYZ,10
  19.  
  20. commbat /ob /r
  21. if errorlevel 9 goto l9
  22. if errorlevel 8 goto l8
  23. if errorlevel 7 goto l7
  24. if errorlevel 6 goto l6
  25. if errorlevel 4 goto l4
  26. if errorlevel 3 goto l3
  27. if errorlevel 2 goto l2
  28. if errorlevel 1 goto l1
  29.  
  30. echo     Message sent
  31. goto end
  32.  
  33. :l9
  34. echo     Parameter error
  35. goto end
  36.  
  37. :l8
  38. echo     Receive timeout
  39. goto end
  40.  
  41. :l7
  42. echo     Interrupted by user
  43. goto end
  44.  
  45. :l6
  46. echo     Receive overflow
  47. goto end
  48.  
  49. :l1
  50. echo     Trigger 1 condition matched
  51. goto end
  52.  
  53. :l2
  54. echo     Trigger 2 condition matched
  55. goto end
  56.  
  57. :l3
  58. echo     Trigger 3 condition matched
  59. goto end
  60.  
  61. :l4
  62. echo     Trigger 4 condition matched
  63. goto end
  64.  
  65. :end
  66. 
  67.